<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 第一钟方式
        let arr = [12,51,32,51,55,56]
        let arr2 = arr.filter((item)=>{
            return item%2==0
        })
        console.log(arr2);
        // 第二种方式
        let arr3 = arr.filter(function(v){
            return v % 3 == 0
        })
        console.log(arr3);
    </script>
</body>
</html>